package com.guigu.youxuan.controller;

import com.guigu.youxuan.pojo.Warehouse;
import com.guigu.youxuan.pojo.WarehouseType;
import com.guigu.youxuan.service.IWarehouseTypeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author liweixin
 * @since 2024-05-15
 */
@CrossOrigin
@Controller
@RequestMapping("/warehouseType")
public class WarehouseTypeController {
    @Autowired
    private IWarehouseTypeService iWarehouseTypeService;
    /**
     * 根据仓库表id查询对应的仓库信息
     * @param
     * @return
     */
    @RequestMapping("/warehouseTypes/{id}")
    @ResponseBody
    public WarehouseType warehouseTypes(@PathVariable int id){
        WarehouseType warehouse=this.iWarehouseTypeService.getById(id);
        return warehouse;
    }
}
